﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace VidoopSecure
{
    public class VidoopSecureException : ApplicationException
    {
        /// <summary>
        /// Creates a <see cref="VidoopSecure.VidoopSecureException" />.
        /// </summary>
        public VidoopSecureException() { }

        /// <summary>
        /// Creates a <see cref="VidoopSecure.VidoopSecureException" />.
        /// </summary>
        public VidoopSecureException(int httpStatusCode, string message)
            : base(message)
        {
            HttpStatusCode = httpStatusCode;
        }

        /// <summary>
        /// Creates a <see cref="VidoopSecure.VidoopSecureException" />.
        /// </summary>
        public VidoopSecureException(string message)
            : base(message)
        {}

        public VidoopSecureException(string message, Exception innerException)
            : base(message, innerException)
        {}

        /// <summary>
        /// Creates a <see cref="VidoopSecure.VidoopSecureException" />.
        /// </summary>
        public VidoopSecureException(int httpStatusCode, string message, Exception innerException)
             : base(message, innerException)
        {
            HttpStatusCode = httpStatusCode;
        }

        /// <summary>
        /// The Http status associated with this exception.
        /// </summary>
        public int HttpStatusCode
        {
            get { return _httpStatusCode; }
            set { _httpStatusCode = value; }
        }
        
        private int _httpStatusCode;
    }
}
